Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Curb radius option #983

Merged
merged 9 commits into from
Dec 23, 2024
Merged

Curb radius option #983

merged 9 commits into from
Dec 23, 2024

Conversation

ewei2406
Copy link
Contributor

@ewei2406 ewei2406 commented Dec 22, 2024

Adds the curb radius option for intersections: #967

  • Adds a new radius field under width and height in the intersection properties panel.
  • Replaces the curb primitive geometry with a 3js mesh generated from the width, height, and radius parameters.
  • Update the README with the changes to the northeastcurb: ..., northwestcurb: ..., ... API:
    The radius is the third value. Example: northeastcurb: 4, 4, 1 for a 4m x 4m curb with a 1m radius in the corner of the intersection.
    Note: the radius that is generated is bounded to the lower of the width and length of the curb. So a 4m x 6m curb will have a radius no smaller than 4m.

image
Screenshot 2024-12-21 at 10 01 30 PM

@ewei2406 ewei2406 marked this pull request as ready for review December 22, 2024 06:14
Copy link
Collaborator

@vincentfretin vincentfretin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just looked at the code and your image, that looks great!
I added a note about disposing the created resources.

src/components/intersection.js Show resolved Hide resolved
@kfarr
Copy link
Collaborator

kfarr commented Dec 23, 2024

@ewei2406 this is awesome! I'll note that for users with existing intersections that do not have corner curb dimensions specified this update will use a default 1m curve radius. However if a curb corner does have height/width then the radius will be 0. I think this is reasonable behavior that a user would expect

image

@kfarr kfarr merged commit ed0d5db into 3DStreet:main Dec 23, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants